package com.reny.ll.git.base_logic.di

import com.reny.ll.git.base_logic.api.ApiGankInterface
import com.reny.ll.git.base_logic.api.ApiInterface
import org.kodein.di.DI
import org.kodein.di.bind
import org.kodein.di.instance
import org.kodein.di.singleton
import retrofit2.Retrofit

private const val SERVICE_MODULE_TAG = "serviceModule"

val serviceModule = DI.Module(SERVICE_MODULE_TAG) {

    bind<ApiInterface> { singleton { instance<Retrofit>(RETROFIT_MODULE_BASE_TAG).create(ApiInterface::class.java) }}

    bind<ApiGankInterface> { singleton { instance<Retrofit>(RETROFIT_MODULE_GANK_TAG).create(ApiGankInterface::class.java) }}

}